//
//  main.c
//  FFmpegDemo
//
//  Created by xiaerfei on 2019/3/1.
//  Copyright © 2019 erfeixia. All rights reserved.
//

#include <stdio.h>
#include <libavutil/log.h>

#include "file/ffmpeg_file.h"
#include "SDL/sdl_display.h"
#include "SDL/sdl_event_display.h"
#include "SDL/sdl_texture_display.h"
#include "sdl_yuv_display.h"
#include "sdl_pcm_display.h"
#include "sdl_player_1_display.h"
#include "sdl_player_2_display.h"
#include "sdl_ffplay.h"

int main(int argc, const char * argv[]) {
    
    av_log_set_level(AV_LOG_DEBUG);
    
//    if (delete_file("./file.txt") == 0) {
//        av_log(NULL, AV_LOG_INFO, "delete file success !\n");
//
//    } else {
//        av_log(NULL, AV_LOG_INFO, "delete file failed !\n");
//    };
//
//
//    if (move_file("./aaa.txt", "../bbb.txt") == 0) {
//        av_log(NULL, AV_LOG_INFO, "move file success !\n");
//    } else {
//        av_log(NULL, AV_LOG_INFO, "move file failed !\n");
//    }
    
//    list("./");
    
//    dump_fmt("./out.mp4");

//    fetch_audio("./out.mp4", "./out.aac");
//    fetch_audio_ffmpeg_api("./out.mp4", "./extra.aac");
//    fetch_vedio_ffmpeg_api("./out.mp4", "extra.h264");
//    transfrom_vedio_to_flv("/Users/xiaerfei/Documents/ffmpegDemo/res/ccc.mp4", "/Users/xiaerfei/Documents/ffmpegDemo/res/transform.flv");
//    cut_vedio(0, 10, "./cctv6live0.ts", "cut_vedio.mp4");
//    compose_vedio("./cut_vedio.mp4", "./111.mp4", "compose.mp4");
//    merge_video("./extra.h264", "./temp.aac", "merge.mp4");
    
//    display_sdl();
//    sdl_event_display();
//    sdl_texture_display();
//    sdl_yuv_display();
//    sdl_pcm_display();
//    sdl_player_1_display();
    sdl_player_2_display();
//    sdl_ffplay_main();
    
    return 0;
}
